package com.fuluwa.domain.usercenter.model.competence;

import java.util.List;

public class CompetenceHelper {
	public static float compute(List<CompetenceSubDefine> subScores, LevelAdditionDefine levelAddtionDefine,
			UserCompetenceScore userCompetenceScore) {
		float ret = 0;
		List<CompetenceSubDefine> subs = subScores;
		for (CompetenceSubDefine compSubDefineScore : subs) {
			ret += compSubDefineScore.compute();
		}
		ret /= subs.size();

		ret *= (levelAddtionDefine.getAddtion() + 1);

		return ret;
	}
}
